<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const obj = {
      a: {
        b: {
          c: 1
        }
      }
    }
    // 可读，不可添加，不可删除，可修改
    const res = Object.seal(obj);
    // res.a = 111;
    res.a.b = 111;
    res.a.d = 111;
    res.c = 222;
    console.log(res); //a不会被修改。但是b被修改了。可以证明seal是浅封闭
  </script>
</body>

</html>